import java.util.Comparator;


public class AnimalPriceComparator implements Comparator<Animal> {
	// realizacija metoda
	@Override
	public int compare(Animal a1, Animal a2) {
//		if (a1.price > a2.price) return 1;
//		if (a1.price == a2.price) return 0;
//		if (a1.price < a2.price) return -1;
		
		// tozhe samoe 4to i sverhu
		return (int)(a1.price - a2.price);
	}

}
